package com.tbmob.tb_h5.utils;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * sp类具体存储文件的方法
 * Created by chenmin on 2018/7/16.
 */

public class SPUtils {

    public static String getH5URL(Context context) {
        if (context == null) {
            return "";
        }
        SharedPreferences sp = context.getSharedPreferences("qb_h5", Context.MODE_PRIVATE);
        return sp.getString("qb_h5_url", "");
    }

    public static void setH5URL(Context context, String oaid) {
        if (context == null) {
            return;
        }
        SharedPreferences sp = context.getSharedPreferences("qb_h5", Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = sp.edit();
        editor.putString("qb_h5_url", oaid);
        editor.commit();
    }
}
